﻿//======================================================
//==     (c)2008 aspxcms inc by NeTCMS v1.0              ==
//==          Forum:bbs.aspxcms.com                   ==
//==         Website:www.aspxcms.com                  ==
//======================================================
using System;
using System.Text;
using System.Data;
using NetCMS.DALFactory;
using NetCMS.Model;

namespace NetCMS.Content
{
    public class UserMisc
    {
        NetCMS.DALFactory.IUserMisc dal;
        public UserMisc()
        {
            dal = DataAccess.CreateUserMisc();
        }

        public DataTable getSiteList()
        {
            DataTable dt = dal.getSiteList();
            return dt;
        }

        #region 菜单部分
        public IDataReader Navilist(string strUserNum)
        {
            return dal.Navilist(strUserNum);
        }

        public DataTable sel_Misc(string strUserNum,int flag)
        {
            DataTable dt = dal.sel_Misc(strUserNum,flag);
            return dt;
        }

        public IDataReader ShortcutList(string strUserNum, int _Num)
        {
            return dal.ShortcutList(strUserNum, _Num);
        }

        public IDataReader menuNavilist(string type, string strUserNum)
        {
            return dal.menuNavilist(type, strUserNum);
        }

        public void addUpdate_manageMenu(NetCMS.Model.UserInfo7 uc,int flag)
        {
            dal.addUpdate_manageMenu(uc,flag);
        }

        public void QShortcutdel(int QID, int _num)
        {
            dal.QShortcutdel(QID, _num);
        }

        public IDataReader QShortcutList(int _num)
        {
            return dal.QShortcutList(_num);
        }

        public void addUpdate_QMenu(NetCMS.Model.UserInfo8 uc,bool flag)
        {
            dal.addUpdate_QMenu(uc,flag);
        }
        #endregion 菜单部分

        #region 会员列表部分

        public DataTable sel_sysInfos(int Uid,int flag)
        {
            DataTable dt = dal.sel_sysInfos(Uid,flag);
            return dt;
        }

        public void UpdateUserInfoBase(NetCMS.Model.UserInfo uc)
        {
            dal.UpdateUserInfoBase(uc);
        }

        public void addUpdate_userFields(NetCMS.Model.UserInfo1 uc1,bool flag)
        {
            dal.addUpdate_userFields(uc1,flag);
        }

        public void addUpdate_fields(NetCMS.Model.UserInfo2 uc,bool flag)
        {
            dal.addUpdate_fields(uc,flag);
        }

        public void UpdateUserSafe(int Uid, string PassQuestion, string PassKey, string password)
        {
            dal.UpdateUserSafe(Uid, PassQuestion, PassKey, password);
        }

        public void UpdateUserInfoBaseStat(NetCMS.Model.UserInfo3 uc)
        {
            dal.UpdateUserInfoBaseStat(uc);
        }

        public void UpdateUserInfoIDCard(int Uid, string _temp)
        {
            dal.UpdateUserInfoIDCard(Uid, _temp);
        }

        public void updateMobile(string _MobileNumber, int BindTF)
        {
            dal.updateMobile(_MobileNumber, BindTF);
        }

        #endregion 会员列表部分

        #region 会员组

        public void del_User(int Gid,int flag)
        {
            dal.del_User(Gid,flag);
        }

        public DataTable sel_GroupListStr(int flag)
        {
            DataTable dt = dal.sel_GroupListStr(flag);
            return dt;
        }

        public void addUpdate_Group(NetCMS.Model.UserInfo4 uc,bool flag)
        {
            dal.addUpdate_Group(uc,flag);
        }
        #endregion 会员组

        #region 公告开始

        public void del_userNews(string Aid,int flag)
        {
            dal.del_userNews(Aid,flag);
        }

        public void update_userInfo(string Aid, string lockstr,int flag)
        {
            dal.update_userInfo(Aid, lockstr,flag);
        }

        public void addUpdate_Announce(NetCMS.Model.UserInfo5 uc,bool flag)
        {
            dal.addUpdate_Announce(uc,flag);
        }
        #endregion 公告结束

        #region 点卡开始

        public DataTable GetPage(string _islock, string _isuse, string _isbuy, string _timeout, string _SiteID, string cardnumber, string cardpassword, int PageIndex, int PageSize, out int RecordCount, out int PageCount, params SQLConditionInfo[] SqlCondition)
        {
            return dal.GetPage(_islock, _isuse, _isbuy, _timeout, _SiteID, cardnumber, cardpassword, PageIndex, PageSize, out RecordCount, out PageCount, SqlCondition);
        }

        /// <summary>
        /// 判断点卡是否重复
        /// </summary>
        /// <param name="CardNumber"></param>
        /// <returns></returns>
        public object getCardNumberTF(string CardNumber)
        {
            return dal.getCardNumberTF(CardNumber);
        }

        /// <summary>
        /// 判断点卡密码是否重复
        /// </summary>
        /// <param name="CardNumber"></param>
        /// <returns></returns>
        public bool getCardPassTF(string CardPass)
        {
            return dal.getCardPassTF(CardPass);
        }

        public void addUpdate_card(NetCMS.Model.IDCARD uc,int flag)
        {
            dal.addUpdate_card(uc,flag);
        }
        /// <summary>
        /// 删除所有点卡 
        /// </summary>
        public void delALLCARD()
        {
            dal.delALLCARD();
        }
        #endregion 点卡结束

        #region 在线支付开始

        public void UpdateOnlinePay(NetCMS.Model.UserInfo6 uc)
        {
            dal.UpdateOnlinePay(uc);
        }

        #endregion 在线支付结束

        #region 前台会员部分
        public string sel_userGroup(string GroupNumber,int flag)
        {
            return dal.sel_userGroup(GroupNumber,flag);
        }

        public int getPasswordTF(string password)
        {
            return dal.getPasswordTF(password);
        }

        public void ResetICard()
        {
            dal.ResetICard();
        }

        public void SaveDataICard(string f_IDcardFiles)
        {
            dal.SaveDataICard(f_IDcardFiles);
        }

        /// <summary>
        /// 得到是否管理员
        /// </summary>
        /// <returns></returns>
        public int getisAdmin()
        {
            return dal.getisAdmin();
        }

        #endregion 前台会员部分结束
        public int sel_picnum(string PhotoalbumID)
        {
            return dal.sel_picnum(PhotoalbumID);
        }
        #region 投稿

        /// <summary>
        /// 获得文章ID内容信息
        /// </summary>
        /// <param name="ConID"></param>
        /// <returns></returns>
        public DataTable getConstrID(string ConID, string UserNum)
        {
            DataTable dt = dal.getConstrID(ConID, UserNum);
            return dt;
        }

        public string getAdminPopandSupper(string UserNum)
        {
            return dal.getAdminPopandSupper(UserNum);
        }

        #endregion 投稿

        //URL
        public void updateURL(string URLName, string URL, string URLColor, string ClassID, string Content, int NUM, int ID)
        {
            dal.updateURL(URLName, URL, URLColor, ClassID, Content, NUM, ID);
        }

        public void updateClass(string ClassName, int NUM, int ID)
        {
            dal.updateClass(ClassName, NUM, ID);
        }
    }
}
